<?php
namespace index\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function comment_submit()
    {
        $data=M('comments');
        $date= date('Y-m-d H:i:s');
        if($data->where('comment_id=1')->find());
        else
        {
            $mydata['comment_id']=1;
            $mydata['comment_content']="null";
            $mydata['comment_title']="null";
            $mydata['articles_article_id']=2;
            $mydata['comment_CreateTime']=$date;
            $data->add($mydata);

        }
        $base=$data->where('comment_id=1')->getfield('comment_content');


        $mydata['comment_id']=$_POST['text'];
        $mydata['comment_content']=$_POST['comment'];
        $mydata['comment_title']=$_POST['text'];
        $mydata['comment_CreateTime']=$date;
        $data->add($mydata);
        $this->success('','#.html',2);
    }
}